using System.Threading.Tasks;
using System.Collections.Generic;

namespace rpc {

internal class SyncDataImpl : SyncData {
    Rpcdata.SyncData value_;
    private List<Role> inter_role_info = new List<Role>();
    public SyncDataImpl() {
        value_ = new Rpcdata.SyncData();
    }
    internal SyncDataImpl(Rpcdata.SyncData v) {
        value_ = v;
        foreach (var k in value_.RoleInfo) {
            inter_role_info.Add(new RoleImpl(k));
        }
    }
    internal Rpcdata.SyncData PBObject {
        get {
            foreach (var k in inter_role_info) {
                value_.RoleInfo.Add(((RoleImpl)k).PBObject);
            }
            return value_;
        }
        set {
            value_ = value;
            foreach (var k in value_.RoleInfo) {
                inter_role_info.Add(new RoleImpl(k));
            }
        }
    }
    public override IList<Role> RoleInfo { get { return inter_role_info; } }
}

}

